"use strict";
// function getData<T>(value:T):T{
//     return value
// }
// getData<number>('hello')
function swap(tuple) {
    return [tuple[1], tuple[0]];
}
console.log(swap([5, 'hello']));
function minFun(arr) {
    var minNum = arr[0];
    for (var i = 0; i < arr.length; i++) {
        if (minNum > arr[i]) {
            minNum = arr[i];
        }
    }
    return minNum;
}
console.log(minFun([1, 2, 0, 4]));
console.log(minFun(['a', 'd', 'c']));
var MinClass = /** @class */ (function () {
    function MinClass() {
        this.list = [];
    }
    MinClass.prototype.add = function (ele) {
        this.list.push(ele);
    };
    MinClass.prototype.getMinNum = function () {
        var minNum = this.list[0];
        for (var i = 0; i < this.list.length; i++) {
            if (minNum > this.list[i]) {
                minNum = this.list[i];
            }
        }
        return minNum;
    };
    return MinClass;
}());
var minNum1 = new MinClass();
minNum1.add('b');
minNum1.add('o');
console.log(minNum1.getMinNum());
var minNum2 = new MinClass();
minNum2.add(1);
minNum2.add(2);
console.log(minNum2.getMinNum());
